<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html ;charset=utf-8">
    <meta name="google" content="notranslate" />
    <meta http-equiv="X-UA-COMPATIBLE" content="IE=edge"/>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>持仓查询</title>
    <link rel="stylesheet" href="{{URL::asset('/ucenter/css/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{URL::asset('/ucenter/css/base.css')}}">
    <link rel="stylesheet" href="{{URL::asset('/ucenter/css/base.css')}}">
    <link rel="stylesheet" href="{{URL::asset('/admin/css/customercx.css')}}">
    <link rel="stylesheet" href="{{URL::asset('/admin/css/chicangcx.css')}}">


</head>
<body>
@include('admin.adminheader')
@include('admin.adminleft')

<div class="L_customerCX">
    <div class="L_cxTitle">
        <span class="bgColor" style="width: 100px;height: 32px;line-height: 32px;margin-left: 40px;"><a href='{{url("/myadmin/chicangcx")}}' style="color: #fff;">查询所有</a></span>
        <span class="kehu">客户一:</span>
        <input type="text" value="@if(isset($names[0])) {{$names[0]}} @endif" placeholder="请输入分析师名称" id="input_1">
        <span class="kehu">客户二:</span>
        <input type="text" value="@if(isset($names[1])) {{$names[1]}} @endif" placeholder="请输入分析师名称" id="input_2">
        <span class="cxBtn">查询</span>
    </div>
    <div class="L_cxCON">
        <div class="L_DD">
            <div class="L_ddTitle">
                <ul>
                    <li>昵称</li>
                    <li>订单号</li>
                    <li>品种名称</li>
                    <li>方向</li>
                    <li>入场价格</li>
                    <li style="width:15%;">下单时间</li>
                    <li>设置止盈</li>
                    <li>止盈价格</li>
                    <li>设置止损</li>
                    <li>止损价格</li>
                </ul>
            </div>
            <div class="L_con">
                @foreach($data as $k=>$v)
                <ul>
                    <li>{{$v->username}}</li>
                    <li>{{$v->tradeid}}</li>
                    <li>{{$v->typename}}</li>
                    <li>@if($v->buy_status = 0) 买入 @else 卖出 @endif</li>
                    <li>{{$v->begin_point}}</li>
                    <li style="width:15%;">{{$v->begin_time}}</li>
                    <li>{{$v->profit_point}}</li>
                    <li>{{$v->target_profit_point}}</li>
                    <li>{{$v->loss_point}}</li>
                    <li>{{$v->target_loss_point}}</li>
                </ul>
                @endforeach
                
                <!-- 分页 -->
<!--                 <div id="pull_right">
                    <div class="pull-right">
                       @include('pagination.default', ['paginator' => $data])
                    </div>
                </div>-->
                
                <div class="L_page">
                   {{ $data->appends(['username' => $searchname])->links() }}
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script type="text/javascript" src="{{ URL::asset('public_js/jquery-1.8.3.min.js') }}"></script>
<script>
    $(function(){
        // 左侧边栏
        $('.j_sideNav > ul > li').eq(3).addClass('active').siblings('li').removeClass('active');
        // 搜索按钮
        $('.L_cxTitle > .cxBtn').click(function(){
            var input_1 = $.trim($('#input_1').val());
            var input_2 = $.trim($('#input_2').val());
            if(input_1 == '' && input_2 == ''){
                alert('请输入正确的搜索条件');
                return false;
            }
            var username = input_1+','+input_2;
            window.location.href = '{{url("/myadmin/chicangcx?username=")}}'+username;
        })
    })
</script>
